package com_1;


import java.util.Calendar;
import java.util.Scanner;

public class CalendarDemo {
    private static Object getInstance;

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个年份");
        int year = sc.nextInt();
        Calendar o = Calendar.getInstance();
        o.set(year,2,1);
         o.add(Calendar.DATE,-1);
        int date = o.get(Calendar.DATE);
        System.out.println(year+"年二月有"+date+"天");


    }
}
